const axios = require('axios')


//  封装成基本方法使用 

async function testpostuse() {
    
const data = await axios.post('https://httpbin.org/post', {
    firstName: 'Fred',
    lastName: 'Flintstone',
    orders: [1, 2, 3],
    photo: ['./a.jpg','b.jpg']
  }, {
    headers: {
      'Content-Type': 'multipart/form-data'
    }
  }
).then(
   res=>{
    console.log(res);
    console.log(res.data);
   }

).catch(
    error=>{
        console.log(error);
        console.log(error.data);

    }
)

}

testpostuse()

